<template>
  <view>
    <u-popup v-model="aftersaleShow" mode="bottom" @close="_close" border-radius="24">
      <view>
        <view class="linh-48 tc fw5 fz-16">请选择申请原因</view>
        <scroll-view scroll-y class="listBody"> 
          <view 
          class="u-padding-left-32 u-padding-right-32 linh-48 tc"
          style="border-top:solid 1px #EEE;" 
          v-for="(item,idx) in aftersaleReason" :key="idx"
          @click="_configAftersale(item)">
            {{item.label}}
          </view>
        </scroll-view>
        <view class="safe-bottom"></view>
      </view>
		</u-popup>
  </view>
</template>
<script>
import { aftersaleReason } from "@/utils/statusList"
export default {
  props: {
    show: {type: Boolean, default: false},
  },
   watch:{
    show(val){
      this.aftersaleShow = val
    }
  },
  computed: {
    aftersaleReason(){
      return aftersaleReason
    },
  },
  data () {
    return {
      aftersaleShow: false
    }
  },
  methods:{
    async _configAftersale(item){
      this.aftersaleShow = false
      this.$emit('config',item)
      this._close()
    },
    _close(){
      this.$emit('close')
    }
  }
}
</script>